package HLLibClasses;

import HLCode.HLClassManager;
import HLCode.HLLibClass;
import HLCode.HLObject;
import HLLib.base.HLByteList;
import HLLib.game.HLSkillCommandManager;

public class HLClassSkillCommandManager extends HLLibClass {
    public HLClassSkillCommandManager(HLClassManager owner) {
        super(owner);
    }

    public HLObject NewObject() {
        return new HLSkillCommandManager();
    }

    public void Execute(HLObject self, int index, HLObject args, HLObject resultOwnerObject, int resultIndex) {
        switch (index) {
        case 0: {
            ((HLSkillCommandManager) self).clearSkillCommandStack();
            break;
        }
        case 1: {
            ((HLSkillCommandManager) self).addCommand(args.GetInt(0), args.GetInt(1));
            break;
        }
        case 2: {
            if (resultOwnerObject == null) {
                ((HLSkillCommandManager) self).compareSkillCommand((HLByteList)args.GetObject(0), args.GetBoolean(0));
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLSkillCommandManager) self).compareSkillCommand((HLByteList)args.GetObject(0), args.GetBoolean(0)));
            }
            break;
        }
        case 3: {
            if (resultOwnerObject == null) {
                ((HLSkillCommandManager) self).compareSkillCommandAndClear((HLByteList)args.GetObject(0));
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLSkillCommandManager) self).compareSkillCommandAndClear((HLByteList)args.GetObject(0)));
            }
            break;
        }
        }
    }
}
